package com.pet.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pet.api.dto.OrderDetailDTO;
import com.pet.common.domain.Result;
import com.pet.order.domain.dto.OrderCheckDTO;
import com.pet.order.domain.dto.PayFormDTO;
import com.pet.order.domain.dto.RefundFormDTO;
import com.pet.order.domain.po.Order;
import com.pet.order.domain.query.OrderQuery;

import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author Cookies
 * @since 2024-07-11
 */
public interface IOrderService extends IService<Order> {

    Result createOrder(List<OrderDetailDTO> detailDTOList);

    Result cancelOrder(Long orderId);

    void timeout2CheckOrder(OrderCheckDTO orderCheckDTO);

    Result getUnpaidOrderDetail(Long orderId);

    Result payOrder(PayFormDTO payFormDTO);

    Result refundOrder(RefundFormDTO refundFormDTO);

    Result getOrderListByCategory(Integer type);

    Result getOrderListByAdmin(OrderQuery orderQuery);

    Result getOrderById(Long id);

    Result shipOrder(Long id);

    Result auditRefund(Long id, Boolean result);

    Result confirmShip(Long orderId);

    void updateOrderByReview(Long orderId);

    List<Integer> getDetailByOrder(Long orderId);
}
